package com.yboot.stater.websocket.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * Stomp 配置参数
 *
 * @author ycs
 * @date 2025/8/27 19:13
 */
@Data
@ConfigurationProperties(prefix = "yboot.websocket.stomp")
public class StompProperties {

    /**
     * 是否启用 Stomp 功能
     */
    private boolean enable = false;

    /**
     * Register a STOMP over WebSocket endpoint at the given mapping path
     */
    private String endpoint;

    /**
     * Enable a simple message broker and configure one or more prefixes to filter destinations targeting the broker (e. g. destinations prefixed with "/ topic").
     */
    private String[] destinationPrefixes = new String[]{"/topic", "/user"};

    /**
     * 以此为前缀的主题，会被路由到 annotated methods
     * 比如：endpoint = "/ws"，applicationDestinationPrefix = /client，客户端发送 /client/ws 会路由到 annotated methods
     */
    private String[] applicationDestinationPrefixes;

}
